﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using Ext.Net;
using Ext.Net.MVC;
using Sharp.Infrastructure;
using Sharp.Platform.Mvc;


namespace Sharp.Web.Models
{
    /// <summary>
    /// 组
    /// </summary>
    public partial class GroupModel : IViewModel
    {
        /// <summary>
        /// 组
        /// </summary>
        public GroupModel()
        {
        }

        /// <summary>
        /// 主键Id
        /// </summary>
        /// <value>主键Id</value>
        [HiddenInput]
        public System.Guid Id { get; set; }

        /// <summary>
        /// 编码
        /// </summary>
        [Display(Name = "编码")]
        [Field(EmptyText = "请输入")]
        public string Code { get; set; }
        /// <summary>
        /// 组名
        /// </summary>
        [Display(Name = "组名"), Required]
        [Field(EmptyText = "请输入")]
        public string Title { get; set; }     
        /// <summary>
        /// 归属组织
        /// </summary>
        [Display(Name = "归属组织"), CustomField(FieldType.OrgList)]
        public string OrgTitle { get; set; }
        public System.Guid? OrgId { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [Display(Name = "备注"), DataType(DataType.MultilineText)]
        public string Remark { get; set; }


        /// <summary>
        /// 父级
        /// </summary>
        public Guid? ParentId
        {
            get;
            set;
        }
        /// <summary>
        /// 排序
        /// </summary>
        public int OrderIndex
        {
            get;
            set;
        }


        public Node OrgTree { get; set; }


    }
}